<?php 
error_reporting(E_ALL);
ini_set("display_errors","On");
include 'c.php';
$uid='';
if (isset($_COOKIE["user"])){
    $uid=$_COOKIE["user"];
}else{
    $uid=date("Ymd").rand(1,99999);
    setcookie("user", $uid, time()+7200);
}
$ip=getIp();
$tag=1;
if (isset($_GET['tag'])){
    $tag=$_GET['tag'];
}
$os=get_os();
$browse=getbrowser();
$detail=array('os'=>$os,'b'=>$browse);
 

$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqliTwo->error);}

$sql="insert into analyse(ip,uid,tag,day,detail,createtime) values('".$ip."','".$uid."','".$tag."','".date("Y-m-d")."','".json_encode($detail)."','".date("Y-m-d H:i:s")."')";
$mysqli->query($sql);

 


